package com.zuihai.app.mvp.ui.activity.base;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.jess.arms.base.BaseActivity;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.mvp.IPresenter;
import com.zuihai.app.R;

/**
 * Created by Administrator on 2017/5/10 0010.
 */

public abstract class BaseNewActivity<P extends IPresenter> extends BaseActivity<P> {


    @Override
    protected void setupActivityComponent(AppComponent appComponent) {

    }

    @Override
    protected View initView() {
        //获取ToolbarLayout
        ViewGroup toolbarLayout = (ViewGroup) LayoutInflater.from(this).inflate(R.layout.activity_new_base, null, false);
        //找到内容容器
        ViewGroup contentContainer = (ViewGroup) toolbarLayout.findViewById(R.id.fl_title);
        //将内容放入到容器中
        LayoutInflater.from(this).inflate(initContentView(), contentContainer, true);

        return toolbarLayout;
    }

    protected abstract int initContentView();


}
